// parmela_frontend.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "parmela_frontend.h"
#include "step_out.h"
#include "element_out.h"
#include "parmela_input.h"
#include "parmela_keyword.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

// The one and only application object

CWinApp theApp;

using namespace std;

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
	int nRetCode = 0;

	HMODULE hModule = ::GetModuleHandle(NULL);

	if (hModule != NULL)
	{
		// initialize MFC and print and error on failure
		if (!AfxWinInit(hModule, NULL, ::GetCommandLine(), 0))
		{
			// TODO: change error code to suit your needs
			_tprintf(_T("Fatal Error: MFC initialization failed\n"));
			nRetCode = 1;
		}
		else
		{
			// TODO: code your application's behavior here.

			lattice::DRIFT kb_test;
			kb_test.set_value(" DRIFT  \t lenght  1.55  0.  ");

			std::vector<lattice::keyword_base> kw_test;
			kw_test.push_back(lattice::DRIFT());
			
			/*
			step_out_reader step;
//			step.read_file(L"stepout.txt");
//			step.read_file(L"tape3.txt");
			element_out_reader element;
			element.read_file(L"phasespace.txt");
//			element.read_file(L"tape2.txt");
			phase_space_dist phase_dist;
			convert_to_phase(phase_dist,element.data[0],-5.2485e-002);
			parmela_distribution_input input;
//			input.write_input_40(element.data[0]);
			input.write_input_0(phase_dist);
			*/


		}
	}
	else
	{
		// TODO: change error code to suit your needs
		_tprintf(_T("Fatal Error: GetModuleHandle failed\n"));
		nRetCode = 1;
	}

	return nRetCode;
}
